FILE *dbfile = fopen (fish_cache_path (), "w");
if (!dbfile)
return;
- fprintf (dbfile, "#%s BABL_TOLERANCE=%f\n",
- BABL_GIT_VERSION, _babl_legal_error ());
+ fprintf (dbfile, "#%s BABL_PATH_LENGTH=%d BABL_TOLERANCE=%f\n",
+ BABL_GIT_VERSION, _babl_max_path_len (), _babl_legal_error ());
/* sort the list of fishes by usage, making next run more efficient -
* and the data easier to approach as data for targeted optimization
/* if babl has changed in git .. drop whole cache */
{
char buf[2048];
- sprintf (buf, "#%s BABL_TOLERANCE=%f",
- BABL_GIT_VERSION, _babl_legal_error ());
+ sprintf (buf, "#%s BABL_PATH_LENGTH=%d BABL_TOLERANCE=%f",
+ BABL_GIT_VERSION, _babl_max_path_len (), _babl_legal_error ());
if (strcmp ( token, buf))
{
free (contents);
return max_length;
}
+int _babl_max_path_len (void)
+{
+ return max_path_length ();
+}
+
/* The task of BablFishPath construction is to compute
* the shortest path in a graph where formats are the vertices
* and conversions are the edges. However, there is an additional
double _babl_legal_error (void);
void babl_init_db (void);
void babl_store_db (void);
+int _babl_max_path_len (void);
#endif